from selenium import webdriver
from selenium.webdriver.common.by import By
import time
from buy.My_password import MyPassword
from PageElementEncapsulation.page_data_login import UserLoginPage
from test_case_execution.test_login import setup
def ce():
    driver =webdriver.Chrome()
    driver.maximize_window()
    driver.get("http://localhost:90/")


# class PageBuyLingQianFinance:
#     # def __init__(self, driver):
#     #     self.driver = driver
def buy_alipay_finance(self):

    self.driver.find_element(By.XPATH, '/html/body/div/div/aside/div[2]/nav/ul/li[2]/a').click()
    self.driver.find_element(By.XPATH, '/html/body/div/div/aside/div[2]/nav/ul/li[2]/ul/li[1]/a').click()
    self.driver.find_element(By.XPATH,
                                 '/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[6]/button').click()
    time.sleep(1)
    MyPassword.pas_in(self.driver)
